home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11788 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  840 b 

  1. Path: prairienet.org!wemccaug
  2. From: wemccaug@prairienet.org (Wendy E. McCaughrin)
  3. Newsgroups: comp.lang.c++
  4. Subject: overloading ->
  5. Date: 16 Mar 1996 01:49:54 GMT
  6. Organization: University of Illinois at Urbana
  7. Message-ID: <4id6o2$t5n@vixen.cso.uiuc.edu>
  8. Reply-To: wemccaug@prairienet.org (Wendy E. McCaughrin)
  9. NNTP-Posting-Host: firefly.prairienet.org
  10.  
  11.  
  12.  
  13.  I realize that in addition to returning an object pointer
  14.  as value, a member operator -> can also return an object,
  15.  but I am wondering if there is a way to overload it so it
  16.  can return two different pointer types directly. My problem
  17.  is that it has to be a member operator taking no arguments,
  18.  so the different return-values would be the only distinction
  19.  and, of course, that is not enough to make them regarded as
  20.  different by the compiler. Any suggestions?
  21.  
  22.  Thanks,
  23.  Wendy
  24.  
  25.